﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lwm.x10c.Intermediate.Instructions
{
    public enum ArithOp
    {
        Add = 1, Sub = 2, Mul = 3, Div = 4, Mod = 5, ShiftLeft = 6, ShiftRight = 7, And = 8, Or = 9, Xor = 10
    }

    public enum ArithOpDump
    {
        add = 1, sub = 2, mul = 3, div = 4, mod = 5, shl = 6, shr = 7, and = 8, or = 9, xor = 10
    }

    public class ArithInsn : Instruction
    {
        public override string NiceName { get { return Enum.GetName(typeof(ArithOp), this.Operator); } }
        public override string DumpName { get { return Enum.GetName(typeof(ArithOpDump), (ArithOpDump)this.Operator); } }
        public override bool Op1Used { get { return true; } }
        public override bool Op2Used { get { return true; } }

        public ArithOp Operator { get; set; }
    }
}
